package cn.g31010.sip.vo
{
	import com.adobe.serialization.json.JSON;
	
	public class Classes
	{
		public function Classes()
		{
		}
		
		public var id:String;

		public var name:String;

		public var parent:Classes;
		public var hessianTypeName:String = "cn.g31010.sip.pojo.Classes";
		
		public function toString():String{
			return JSON.encode(this);
		}
		
		public static function create(obj:Object):Classes{
			if(obj==null)
				return null;
			var c:Classes=new Classes();
			if(obj.hasOwnProperty("id")){
				c.id=String(obj.id);
			}
			if(obj.hasOwnProperty("name")){
				c.name=String(obj.name);
			}
			if(obj.hasOwnProperty("parent")){
				c.parent=Classes.create(obj.parent);
			}
			return c;
		}
	}
}